/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-04-29 16:40:38
 * @LastEditTime: 2022-04-29 23:47:23
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
import React, { Component } from 'react'
import { Route,Redirect } from 'react-router-dom'
import MyNavLink from '../../components/MyNavLink'
import News from './News'
import Message from './Message'

export default class Home extends Component {
  render() {
    return (
      <div>
        <h2>Home组件内容</h2>
        <div>
          <ul className="nav nav-tabs">
            <li>
              <MyNavLink to='/home/news'>News</MyNavLink>
            </li>
            <li>
              <MyNavLink to='/home/message' >Message</MyNavLink>
            </li>
          </ul>
          {/* 二级路由 */}
          <Route path='/home/news' component={News}></Route>
          <Route path='/home/message' component={Message}></Route>
          <Redirect to='/home/news'></Redirect>

        </div>
      </div>
    )
  }
}
